-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix misplacement of geometry parts #30
Conversation
Add provided unit test slightly modified refers to #29
Improve readablity
@rbrundritt, @xivk, @kolyanch NetTopologySuite.IO.VectorTiles/src/NetTopologySuite.IO.VectorTiles.Mapbox/MapboxTileWriter.cs Lines 236 to 249 in 556e70c
|
I believe that the processing of small objects should be the same for polygonal and linear objects. I opened the MVT specification, there is nothing about linear objects. But there is a strict rule for polygonal ones:
In short I vote for checks for linear objects) |
I did think about this, as well as the 1-pixel area polygon scenario (or user defined minimums). The main issue I've ran into in the past with this is you end up in scenarios where the end user is zoomed out and you have an empty map and can't see where the data is. I've found that it is often better to show 1-pixel for lines/polygons in this scenario, at least from a real-world user experience perspective. That said, it would depend on your data set. If you are showing a single data set, it's nice to have these show, but if you have multiple datasets where shapes are different sizes, then it may be desirable to not have the smaller shapes appear. With all this in mind, having a configuration setting on a per layer level, where the minimum area/length of a polygon/line could be set, would be a "nice to have" feature. But this definitely shouldn't be forced. |
I also believe by default we should drop anything that is too small. I even thought this was the default behavior, I have some checking to do on some of our services now... |
* Write encoded geometries directly to the destination list * If id is ulong use it directly
Add provided unit test slightly modified refers to #29
Improve readablity
* Add ExtentInPixels to TileGeometryTransform * Add HasValidExtent functions to EncodeTo functions for lineal and polygonal geometries
I went with @rbrundritt suggestion to have it configurable. MapBoxTileWriter has Please reeavaluate @rbrundritt , @xivk and @kolyanch. |
If components of geometries are too small to be encoded at the provided zoom level the encoded data is deleted in
Encode(CoordinateSequence seq, ..., ref int currentX, ref int currentY, ...)
but the values ofcurrentX
andcurrentY
are not reset to their initial values. This causes all subsequent geometry items to have a wrong offset.This PR fixes this by
closes #29